<?php
include('cfg/def.php');
include('cfg/cfg.php');

include_once('lib/mysql.class.php');
include_once('lib/timer.class.php');
include_once('models/parser.class.php');
include_once('lib/logger.class.php');

header('Content-Type: text/plain; charset=utf-8');

$timer = new Timer();
$timer->start();

$letter = $HTTP_RAW_POST_DATA;
echo $letter;

Logger::$log_file = $log_file_name;
Logger::Write(__FILE__." line: ".__LINE__, "LETTER: ".$letter);

$parser = new Parser();
$parser->load_data();



// $test = $_GET["letter"];
// echo $test;

// $letter = get_text($file);

$sms = $parser->parse_letter($letter);
// echo $sms["text"];
// echo "Executing time is ".$timer->stop()." seconds";

